package com.mallcloud.mall.mall.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.mallcloud.mall.common.core.constant.enums.mall.MallCommonEnum;
import com.mallcloud.mall.common.core.util.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@ApiModel(value = "MallAdvertisingTypeModel", description = "广告位类型")
@Data
@TableName("SYS_ADVERTISINGTYPE")
public class MallAdvertisingTypeModel implements Serializable {
    private static final long serialVersionUID = 1L;

	@JsonSerialize(using = ToStringSerializer.class)
	@NotNull(message = "id为空", groups = {ValidGroup.Update.class})
    @TableId(value = "satcode", type = IdType.ASSIGN_ID)
    @ApiModelProperty("广告位编码")
    private Long id;

    @ApiModelProperty("广告位名称")
	@TableField(value = "satname")
	private String name;

	/**
	 * {@link MallCommonEnum.StatusEnum}
	 */
	@ApiModelProperty("状态")
	@TableField(value = "satstatus")
    private String status;

}
